package com.hnn.Dao.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnDBMysql {
    private Connection ct = null;
    public Connection getConn(){

        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            ct= DriverManager.getConnection("jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=utf-8\",\"root\",\"123456\"");
        } catch (ClassNotFoundException | SQLException e) {
            e.printStackTrace();
        }
        return ct;
    }
}
